<?php 

$path_extra = dirname(__FILE__).DIRECTORY_SEPARATOR."lib";
$path = ini_get('include_path');
$path = $path_extra.PATH_SEPARATOR.$path;
ini_set('include_path', $path);

require_once ("platform/FeatureManager.php");
require_once ("platform/Interceptor.php");
require_once ("YSI.php");
require_once ("Utils.php");
require_once ("MVC.php");

require_once ("config.php");
require_once ("constant.php");
require_once ("DB.php");
require_once ("services.php");

date_default_timezone_set('Asia/Chongqing');

$ysi = new YSI(RESOURCE_BASE."ysi/", dirname(__FILE__)."/resources/ysi/ysi.template");
$ysi->load();

$featureManager = new FeatureManager(FEATURE_PATH, RUNTIME_PATH.DIRECTORY_SEPARATOR.RUNTIME_PLATFORM_FOLDER,
     Array('com_yizin_platform_PlatformFeature', 'com_yizin_fm_FMFeature'));
$featureManager->load();

$uri = Utils::getURI();
$routerContext = array('uri'=>$uri);
$featureManager->apply("com.yizin.platform.router", $routerContext);

?>
